package home.my.recordmanage.dao;

import home.my.base.dao.BaseDao;
import home.my.recordmanage.model.ErrorType;
import home.my.recordmanage.model.RecordSource;

import org.hibernate.SQLQuery;

public class RecordSourceDao extends BaseDao<RecordSource> {
	@Override
	public void delete(RecordSource entity) {
		SQLQuery qu = this.getSession().createSQLQuery("delete from " + new ErrorType().getTableName() + " where 1=1 and RECORD_SOURCE_FK=:id");
		qu.setLong("id", entity.getId()).executeUpdate();
		super.delete(entity);
	}
}